﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VERKProjectHopur16.Models.ContentViewModel>" %>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend></legend>

            <div class="editor-label" style="display:none">
                <%: Html.LabelFor(model => model.ContentID) %>
            </div>
            <div class="editor-field" style="display:none">
                <%: Html.TextBoxFor(model => model.ContentID)%>
                <%: Html.ValidationMessageFor(model => model.ContentID)%>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Title) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Title) %>
                <%: Html.ValidationMessageFor(model => model.Title) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Text) %>
            </div>
            <div class="editor-field">
                <%: Html.TextAreaFor(model => model.Text, 15, 50, new { @id = "form-text-textarea" } )%>
                <%: Html.ValidationMessageFor(model => model.Text) %>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.Departments) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.DepartmentID, Model.Departments)%>
                <%: Html.ValidationMessageFor(model => model.DepartmentID) %>
            </div>
            
            <div class="editor-label" style="display:none">
                <%: Html.LabelFor(model => model.Categories) %>
            </div>
            <div class="editor-field" style="display:none">
                <%: Html.DropDownListFor(model => model.CategoryID, Model.Categories)%>
                <%: Html.ValidationMessageFor(model => model.CategoryID)%>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.Authors) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.AuthorID, Model.Authors)%>
                <%: Html.ValidationMessageFor(model => model.AuthorID)%>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.Languages) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.LanguageID, Model.Languages)%>
                <%: Html.ValidationMessageFor(model => model.LanguageID)%>
            </div>

            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back", "Index")%>
    </div>

